function normalizeErdos()
inDir='/Users/matthew/workspace/mfiles/projects/all/mc/';
outDir='/Users/matthew/workspace/mfiles/projects/all/mc/';
filter='densityTrend_*';
files=dir(fullfile(inDir,filter));

load(fullfile(inDir,files(1).name));
nSubjs=size(obsQxD_one,2);
nNodes=size(obsCixD_one,3);
nTestedDensity=size(density,2);
nSurrogateErdos=100;

for i=1:length(files)
load(fullfile(inDir,files(i).name));
[ss,bandName]=strtok(files(i).name,'_');
[bandName,ss]=strtok(bandName,'.');
one=find(sum(connected_one,2)==nSubjs);
two=find(sum(connected_two,2)==nSubjs);
    for j=1:length(one)
        
        if(find(two==one(j)))    
          
           [avgQErdos,stdQErdos]=erdos(nSurrogateErdos,nNodes,nEdge_one(one(j),1));
           mQ=[(obsQxD_one(one(j),:)./avgQErdos),
               (obsQxD_two(one(j),:)./avgQErdos),
               (avgSurrQxD_one(one(j),:)./avgQErdos),
               (avgSurrQxD_two(one(j),:)./avgQErdos)
               ]';
           
           outfile=strcat(num2str(density(one(j))),'_mQ');
           outfile=strcat(outfile,bandName);
           save(fullfile(outDir,outfile),'mQ');
           dlmwrite(fullfile(outDir,strcat(outfile,'.txt')),mQ,'delimiter','\t','precision','%f')
           
        end
        
    end
    
end